<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set value="${pageContext.request.contextPath}" var="path"></c:set>
<html>
<head>
    <meta charset="UTF-8">
    <title>评价详情</title>
    <script src="${path}/static/js/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" href="${path}/static/css/staffcss.css">
    <script src="${path}/static/js/script.js"></script>
</head>
<body>
<div class="container">
    <header>
        <h1>评价详情</h1>
        <jsp:include page="inc/inc.jsp"></jsp:include>
    </header>
    <main>
        <div style="display: flex; justify-content: center; align-items: center; margin: 0 auto;width: 100%;position: relative">
            <div style="text-align: center;">
                分数:<label style="color: #c99800">
                <c:choose>
                    <c:when test="${requestScope.review.score==5}">
                        ★★★★★
                    </c:when>
                    <c:when test="${requestScope.review.score==4}">
                        ★★★★
                    </c:when>
                    <c:when test="${requestScope.review.score==3}">
                        ★★★
                    </c:when>
                    <c:when test="${requestScope.review.score==2}">
                        ★★
                    </c:when>
                    <c:when test="${requestScope.review.score==1}">
                        ★
                    </c:when>
                </c:choose>
            </label>
                <br><br>
                评论:
                <c:choose>
                    <c:when test="${not empty requestScope.review.comment}">
                        ${requestScope.review.comment}
                    </c:when>
                    <c:otherwise>
                        暂无评论
                    </c:otherwise>
                </c:choose>
                <br><br>
                <label style="color: #999">
                    时间:
                    <c:choose>
                        <c:when test="${not empty requestScope.review.createdAt}">
                            <fmt:formatDate value="${requestScope.review.createdAt}" pattern="yyyy - MM - dd HH:mm:ss"></fmt:formatDate>
                        </c:when>
                        <c:otherwise>
                            暂无时间信息
                        </c:otherwise>
                    </c:choose>
                </label>
            </div>
        </div>
    </main>
</div>
</body>
</html>